/*
 *  clusters.h
 *  bgsubtraction
 *
 *  Created by a1gucis on 4/5/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */
#ifndef CLUSTERS_H
#define CLUSTERS_H
#include "cluster.h"
#include <vector>
#include <iostream>
using namespace std;

class Clusters {
private:
	vector<Cluster *> *clusters; 
	bool sorted; //a flag, whether clusters vector is sorted or not
	
	void sort(); // sorts the clusters vector
public:
	Clusters();
	~Clusters();
	
	void addLabel(int ); //adds a label to the clusters array. If the label is already in the array, increases it's quantity
	int getMaxLabel(); //returns the label with the maximum quantity
	int getLabel(int ); //returns the N'th maximum label, starting from 1
	void clear(); //clears the clusters vector
	
	//debug purposes
	void print(); //prints the contents of the clusters array
	int getSize();
};

#endif
